package com.bdqn.springweb;

import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

public class InterceptorConfig implements WebMvcConfigurer {
    private String[] excludePatterns;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        String[] pathPatterns = { "/**" };
        String[] excludePathPatterns = { "/login","/regist","/statice/**" };
        registry.addInterceptor(new AuthorizationInterceptor()).addPathPatterns(pathPatterns).excludePathPatterns(excludePathPatterns);
    }
}
